Skip to content

[Feature] 온보딩 초대코드 자동입력 기능 추가#152

Merged
seseoju merged 3 commits intodevelopfrom
feature/150
Mar 6, 2026
Merged

[Feature] 온보딩 초대코드 자동입력 기능 추가#152
seseoju merged 3 commits intodevelopfrom
feature/150

Conversation

@seseoju
Copy link
Member

@seseoju seseoju commented Mar 5, 2026

🛠️ 변경 사항

실제로 어떤 작업을 했는지 구체적으로 작성해주세요.

  • UI 수정 (Design)
  • 기능 추가 (Feature)
  • 버그 수정 (Bug)
  • 리팩토링 (Refactor)
  • 성능 개선 (Performance)
  • 테스트 추가 (Chore)
  • 기타:

세부 변경 내용

  • inviteCode 쿼리 파라미터를 조회해 초대코드 입력 인풋의 defaultValue로 추가해 자동입력을 구현했습니다.
  • URL에서 원하는 쿼리 파라미터를 조회하는 getQueryParam 유틸을 추가했습니다. 이와 관련해 카카오 인가코드 조회 로직도 함께 리팩토링했어요.

🔍 관련 이슈

관련 이슈를 링크해주세요. ex) close #23, related #23


📸 스크린샷 / GIF (선택)

UI 변경이 있다면 첨부해주세요.

Before After

⚠️ 주의 사항 / 리뷰 포인트

리뷰어가 특히 봐줬으면 하는 부분이나 고민했던 지점을 작성해주세요.


🔄 연관 작업

후속 작업이나 연관된 PR이 있다면 링크해주세요.

@seseoju seseoju requested a review from yummjin March 5, 2026 06:49
@seseoju seseoju self-assigned this Mar 5, 2026
@seseoju seseoju added the ✨ Feature 신규 기능을 추가합니다. label Mar 5, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 온보딩 과정에서 사용자가 초대 코드를 수동으로 입력할 필요 없이, URL에 포함된 초대 코드를 자동으로 인식하여 입력 필드에 채워주는 기능을 추가합니다. 이를 위해 쿼리 파라미터를 효율적으로 처리하는 유틸리티 함수를 도입하고, 기존 카카오 로그인 로직에도 이를 적용하여 코드의 일관성을 개선했습니다. 사용자 경험을 향상시키고 개발 효율성을 높이는 데 기여합니다.

Highlights

  • 온보딩 초대코드 자동 입력: URL의 inviteCode 쿼리 파라미터를 조회하여 온보딩 초대코드 입력 필드의 defaultValue로 설정함으로써 자동 입력 기능을 구현했습니다.
  • 쿼리 파라미터 유틸리티 추가: URL에서 특정 쿼리 파라미터 값을 조회하는 getQueryParam 유틸리티 함수를 shared/lib/url.ts에 새로 추가했습니다.
  • 카카오 인가코드 조회 로직 리팩토링: 기존에 URLSearchParams를 직접 사용하던 카카오 인가코드 조회 로직을 새로 추가된 getQueryParam 유틸리티를 사용하도록 리팩토링하여 코드의 재사용성과 가독성을 높였습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • apps/web/src/features/auth/model/useKakaoCode.ts
    • getQueryParam 유틸리티를 임포트했습니다.
    • 카카오 인가 코드를 조회하는 로직을 getQueryParam을 사용하도록 변경했습니다.
  • apps/web/src/pages/onboarding/ui/OnboardingPage.tsx
    • getQueryParam 유틸리티를 임포트했습니다.
    • URL에서 inviteCode 쿼리 파라미터를 조회하여 defaultInviteCode 변수에 할당했습니다.
    • OnboardingCrewJoin 컴포넌트에 defaultInviteCodedefaultValue prop으로 전달했습니다.
  • apps/web/src/shared/lib/url.ts
    • URL에서 특정 쿼리 파라미터 값을 추출하는 getQueryParam 함수를 추가했습니다.
  • apps/web/src/widgets/onboarding/ui/OnboardingCrewJoin.tsx
    • defaultValue prop의 기본값을 빈 문자열로 설정했습니다.
    • inviteCode 상태를 defaultValue로 초기화하도록 변경했습니다.
Activity
  • 이 PR은 아직 활동이 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 getQueryParam 유틸리티 함수를 도입하여 초대 코드를 URL에서 자동으로 읽어오는 기능을 구현한 점이 좋습니다. 이를 통해 코드 재사용성이 높아지고, 기존 카카오 로그인 로직도 개선되어 전체적인 코드 품질이 향상되었습니다. 다만, 새로 추가된 getQueryParam 함수의 안정성과 명확성을 높이기 위해 일부 개선이 필요해 보입니다. 관련하여 apps/web/src/shared/lib/url.ts 파일에 리뷰 의견을 남겼습니다.

Comment on lines +1 to +12
export const getQueryParam = (
key: string,
search: string = window.location.search
): string | undefined => {
const value = new URLSearchParams(search).get(key);

if (!value) {
return undefined;
}

return value;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

새로 추가된 getQueryParam 유틸리티 함수의 안정성과 명확성을 높이기 위한 개선 제안입니다.

  1. window 객체 접근 시점: 함수 시그니처의 기본값으로 window.location.search를 사용하면, 코드가 서버사이드 렌더링(SSR) 등 브라우저가 아닌 환경에서 실행될 때 window 객체가 없어 에러가 발생할 수 있습니다. window 객체는 함수가 호출되는 시점에, 즉 함수 본문 내에서 접근하는 것이 더 안전합니다.

  2. 값 부재 시 처리 로직: URLSearchParams.get() 메서드는 파라미터가 없을 경우 null을 반환합니다. 현재 !value 조건문은 null 뿐만 아니라 값이 비어있는 파라미터(?key=)가 전달될 때의 결과인 빈 문자열('')까지 undefined로 처리하여, 의도치 않은 동작을 유발할 수 있습니다. null일 경우에만 undefined를 반환하도록 명확히 하는 것이 좋습니다.

아래 제안 코드는 이 두 가지를 모두 개선합니다.

Suggested change
export const getQueryParam = (
key: string,
search: string = window.location.search
): string | undefined => {
const value = new URLSearchParams(search).get(key);
if (!value) {
return undefined;
}
return value;
};
export const getQueryParam = (
key: string,
search?: string
): string | undefined => {
const searchString = search ?? window.location.search;
const value = new URLSearchParams(searchString).get(key);
// .get()은 파라미터가 없을 때 null을 반환합니다.
// null 병합 연산자(??)를 사용해 null일 경우 undefined를 반환하도록 합니다.
// 이 방식은 빈 문자열('')은 그대로 유지합니다.
return value ?? undefined;
};

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@seseoju seseoju merged commit 2a62998 into develop Mar 6, 2026
2 checks passed
@seseoju seseoju deleted the feature/150 branch March 6, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 신규 기능을 추가합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 온보딩 초대코드 자동입력 기능 추가

1 participant